<div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_{$value['first_char']}" ><img src="{:get_style_cdnurl()}paimai/yunying/images/yun_jia.jpg">{$value['name']}</span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_{$v["first_char"]}' href="{$v['url']}">{$v['name']}</a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<assign name="menu" value="[menu]"/>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '{$menu}', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>